package com.xgq.drink.service;

import com.xgq.drink.entity.ChatMessage;
import com.xgq.drink.entity.R;

import java.util.List;
import java.util.Map;

/**
 * 聊天消息服务接口
 */
public interface IChatMessageService {
    R sendPrivateMessage(String senderId, String receiverId, Object content, Integer messageType);

    R sendGroupMessage(String senderId, String groupId, Object content, Integer messageType);

    /**
     * 标记消息为已读
     * 
     * @param messageId 消息ID
     * @return 结果
     */
    R markMessageAsRead(String messageId);

    /**
     * 标记用户所有未读消息为已读
     * 
     * @param receiverId 接收者ID
     * @param senderId   发送者ID
     * @return 结果
     */
    R markAllMessagesAsRead(String receiverId, String senderId);

    public List<Map<String, Object>> fetchPaginatedMessages(String receiverId, String senderId, int page,
            int pageSize);

    public List<Map<String, Object>> fetchGroupMessages(String groupId, int page, int pageSize);
}